package org.codert.mybatis.domain.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.codert.mybatis.domain.User;
import org.codert.mybatis.domain.UserDo;

import java.util.List;
import java.util.Map;

/**
 * @author: TanJingyu
 * @create: 2021-08-20 15:52
 **/
public interface UserMapper {

    Boolean insertSelective(@Param("tag") String tag, @Param("users") List<User> users);

    Boolean insert(@Param("userMap")Map<Integer, String> userMap);

    Boolean delete(@Param("stat") Boolean stat);

    @Update("update user set stat = #{stat} where id = 6")
    Boolean update(@Param("stat") Boolean stat);

    UserDo selectAStat();

    @Delete("delete from user where stat = #{stat}")
    Boolean deleteByBoolean(@Param("stat") Boolean stat);

    Boolean listDelete(@Param("ids") List<Integer> ids);
}
